local class = reload("class")
local super = reload("super.basic")
local characters = reload("global.characters")

---@class objsuper
local this = class(super)

function this:ctor(info)
    self._info = info
    self:clear()
    self:int()
end

function this:init()
    ---映射全局对象
    local info = self.info
    info.objid = characters.objid + 1
    characters.objid = info.objid
    characters.map[info.objid] = self
end

---对象释放
function this:gcback()
    characters.map[self:objid()] = nil
end

---对象标识
function this:objid()
    return self._info.objid
end

---获取对象数据
function this:getobj(objid)
    return characters.map[objid]
end

---名字
function this:name()
    return self._info.name
end

---模型
function this:model()
    return self._info.model
end

---纹理
function this:image()
    return self._info.image
end

---发型
function this:hairstyle()
    return self._info.hairstyle
end

---发色
function this:haircolor()
    return self._info.haircolor
end

---帽子
function this:hat()
    return self._info.hat
end

---眼镜
function this:glasses()
    return self._info.glasses
end

--项链
function this:necklace()
    return self._info.necklace
end

---翅膀
function this:wings()
    return self._info.wings
end

---衣服
function this:clothes()
    return self._info.clothes
end

---手套
function this:glove()
    return self._info.glove
end

---戒指
function this:ring()
    return self._info.ring
end

---裤子
function this:pants()
    return self._info.pants
end

---腰带
function this:belt()
    return self._info.belt
end

---袜子
function this:socks()
    return self._info.socks
end

---鞋子
function this:shoes()
    return self._info.shoes
end

---武器
function this:weapon()
    return self._info.weapon
end

function this:mapid()
    return self._info.mapid
end

function this:floor()
    return self._info.floor
end

function this:x()
    return self._info.x
end

function this:y()
    return self._info.y
end

function this:z()
    return self._info.z
end

function this:dir()
    return self._info.dir
end

function this:ifPlayer()
    return false
end

function this:ifMonster()
    return false
end

function this:ifNpC()
    return false
end

return this
